import axios from 'axios';

export interface ProjectListParams {
  pageNo: number;
  pageSize: number;
  projectType: number;
  name?: string;
}

export interface projectItem {
  name: string;
  type: number | string;
  id?: string;
  description?: string;
  code?: string;
  protemId?: string;
  budget?: string;
  planStart?: string;
  planEnd?: string;
}
export const getProjectList = (params: ProjectListParams) => {
  return axios.get('/cde-collaboration/project/list', { params });
};

export const createProject = (params: projectItem) => {
  return axios.post('/cde-collaboration/project/save', params);
};

// 获取用户在某项目下的teams和权限
export const getUserTeamsInPrj = (projectId: string) => {
  return axios.get('/cde-collaboration/team/getTeams', {
    params: { projectId },
  });
};

export default null;
